import service from "@/api/index.js";
import qs from "qs";

const strategyApi = {
    insert(strategy){
        return service.post(`/strategy`, strategy);
    },
    delete(id){
        return service.delete(`strategy/${id}`);
    },
    update(strategy){
        return service.put("/strategy",strategy)
    },
    selectByUser(){
        return service.get("/strategy/user");
    },
    selectAll(condition, pageNum, pageSize){
        condition.pageNum = pageNum;
        condition.pageSize = pageSize;
        return service.get("/strategy", {
            params: condition});
    },
    selectById(id){
        return service.get(`/strategy/${id}`)
    }
}

export default strategyApi;